home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / mach / ds5000.md / loMem.s < prev    next >
Text File  |  1991-05-08  |  1KB  |  38 lines

  1. /* loMem.s -
  2.  *
  3.  *     Contains code that is the first executed at boot time.
  4.  *
  5.  *    Copyright (C) 1989 Digital Equipment Corporation.
  6.  *    Permission to use, copy, modify, and distribute this software and
  7.  *    its documentation for any purpose and without fee is hereby granted,
  8.  *    provided that the above copyright notice appears in all copies.  
  9.  *    Digital Equipment Corporation makes no representations about the
  10.  *    suitability of this software for any purpose.  It is provided "as is"
  11.  *    without express or implied warranty.
  12.  *
  13.  * $Header: /sprite/src/kernel/mach/ds5000.md/RCS/loMem.s,v 1.2 91/05/08 16:27:51 jhh Exp $ SPRITE (DECWRL)
  14.  */
  15.  
  16. #include "machConst.h"
  17. #include "machAddrs.h"
  18. #include <regdef.h>
  19.  
  20. /*
  21.  * Amount to take off of the stack for the benefit of the debugger.
  22.  */
  23. #define START_FRAME    ((4 * 4) + 4 + 4)
  24.  
  25.     .globl    start
  26.     .globl    eprol
  27. start:
  28. eprol:
  29.     sw        zero, MACH_CSR_ADDR        # Clear csr
  30.     mtc0    zero, MACH_COP_0_STATUS_REG    # Disable interrupts
  31.     li        sp, MACH_CODE_START - START_FRAME
  32.     la        gp, _gp
  33.     sw        zero, START_FRAME - 4(sp)    # Zero out old ra for debugger
  34.     sw        zero, START_FRAME - 8(sp)    # Zero out old fp for debugger
  35.     jal        main                # main(argc, argv, envp)
  36.     add        a0, zero, zero            
  37.     jal        Proc_Exit            # Proc_Exit(0)
  38.